﻿using DHQGHN.DAL.DAO.DHQG;
using DHQGHN.DAL.Models.DHQG;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DHQGHN.DAL.BO.DHQG
{
    public class PhanQuyenVanBanBO : BaseBO
    {
        private PhanQuyenVanBanDAO _dao;
        public PhanQuyenVanBanBO()
        {
            _dao = new PhanQuyenVanBanDAO(Common.ConnectionUtil.DHQGHN_CONNECTION_STRING, DEFAULT_MAPPER_TYPE);
        }
        public bool Save(List<PhanQuyenVanBan> data)
        {
            try
            {
                return _dao.Save(data);
            }
            catch
            {
                throw;
            }
        }
        public bool DeletebyVanban(int vanbanid)
        {
            try
            {
                return _dao.DeletebyVanban(vanbanid);
            }
            catch
            {
                throw;
            }
        }
        public List<PhanQuyenVanBan> GetallbyVanban(int vanbanid) {
            try
            {
                return _dao.GetallbyVanban(vanbanid);
            }
            catch
            {
                throw;
            }
        }
    }
}
